public static partial class Utility
{

    /// <summary>
    /// 进度条工具
    /// </summary>
    public static class Progress
    {

        /// <summary>
        /// 获取进度条增加倍率
        /// </summary>
        /// <param name="curPro">当前进度</param>
        /// <param name="targetPro">目标进度</param>
        /// <param name="minRate">最低倍率</param>
        /// <param name="fulRate">满值（1f）倍率</param>
        /// <returns></returns>
        public static float GetProgressRate(float curPro, float targetPro, float minRate = 0.02f, float fulRate = 2f)
        {
            if (targetPro >= 1f)
            {
                return fulRate;
            }
            return System.Math.Max(minRate, targetPro - curPro);
        }
    }
}
